module.exports = ({ router }) => {

    router.get("/stock/search", async (ctx) => {
        ctx.body.data = await require("../controller/search")({ ...ctx.query })
    })

    router.get('/stock/holding/list', async (ctx) => {
        ctx.body.data = await require("../controller/holding/list")({ ...ctx.query })
    })

    router.get('/stock/optional/list', async (ctx) => {
        ctx.body.data = await require("../controller/optional/list")({ ...ctx.query })
    })

    router.get('/stock/recommend/scan', async (ctx) => {
        ctx.body.data = await require("../controller/recommend/scan_离年线远的")({ ...ctx.query })
    })

    router.post('/stock/recommend/save', async (ctx) => {
        ctx.body.data = await require("../controller/recommend/save")({ ...ctx.request.body })
    })

    router.get('/stock/recommend/list', async (ctx) => {
        ctx.body.data = await require("../controller/recommend/list")({ ...ctx.query })
    })

    router.post("/stock/details", async (ctx) => {
        ctx.body.data = await require("../controller/details")({ ...ctx.request.body })
    })

    router.get("/stock/realtime", async (ctx) => {
        ctx.body.data = await require("../controller/realtime")({ ...ctx.query })
    })

    router.get("/stock/quantitativeTrading/getScanStockList", async (ctx) => {
        ctx.body.data = await require("../controller/quantitativeTrading/getScanStockList")({ ...ctx.query })
    })

    router.post("/stock/quantitativeTrading/updateStockList", async (ctx) => {
        ctx.body.data = await require("../controller/quantitativeTrading/updateStockList")({ ...ctx.request.body  })
    })
}